﻿<div bsModal #createUserModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="createUserModal" aria-hidden="true" [config]="{backdrop: 'static'}">
    <div class="modal-dialog">
        <div class="modal-content">
            <form *ngIf="active" #createUserForm="ngForm" novalidate (ngSubmit)="save()">
                <div class="modal-header">
                    <button type="button" class="close" (click)="close()" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">
                        <span>创建用户</span>
                    </h4>
                </div>

                <div class="modal-body">
                    <div class="form-group">
                        <label>手机号</label>
                        <input class="form-control" type="text" name="phoneNumber" [(ngModel)]="user.phoneNumber" required maxlength="32" minlength="2">
                    </div>
                    <div class="form-group">
                        <label>姓名</label>
                        <input type="text" name="Name" class="form-control" [(ngModel)]="user.name" required maxlength="32">
                    </div>
                    <div class="form-group">
                        <label>初始密码</label>
                        <input type="password" name="Password" class="form-control" [(ngModel)]="user.password" required maxlength="32">
                    </div>
                    <div class="checkbox">
                        <label>
                            <input type="checkbox" name="IsActive" value="true" value="true" [(ngModel)]="user.isActive" checked="checked"> 启用
                        </label>
                    </div>
                </div>

                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">取消</button>
                    <button type="submit" class="btn btn-primary blue" [disabled]="!createUserForm.form.valid"><i class="fa fa-save"></i> <span>保存</span></button>
                </div>

            </form>

        </div>
    </div>
</div>